package com.cv.platform.controller.platform.collection.vo;

import com.cv.framework.common.pojo.Result;
import com.cv.platform.controller.platform.collection.vo.ref.CvVideoCollectionRefRespVO;
import com.cv.platform.service.collection.CvVideoCollectionRefService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import java.util.List;

import static com.cv.framework.common.pojo.Result.success;

/**
 * 视频平台 - 视频合集关联控制层
 *
 * @author Charles_XDXD
 */
@Tag(name = "视频平台 - 视频合集关联控制层")
@RestController
@RequestMapping("/platform/video/collection/ref")
public class CvVideoCollectionRefController {

    @Resource
    private CvVideoCollectionRefService cvVideoCollectionRefService;

    @GetMapping("list")
    @Operation(summary = "获取视频合集关联列表")
    @PermitAll
    public Result<List<CvVideoCollectionRefRespVO>> getVideoIdListByCollectionId(Long videoId) {
        return success(cvVideoCollectionRefService.getCvVideoCollectionRefByVideoId(videoId));
    }

}
